package com.typhoon.springboot_demo1.controller;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.typhoon.springboot_demo1.entity.User;

@RestController
@RequestMapping("/user")
public class UserController {
	
	@RequestMapping(value = "/{id}")
	public User getUserById(@PathVariable(value="id") Long id) {
		User user = new User();
		user.setId(id);
		user.setName("Typhoon");
		user.setSex(1);
		user.setAge(28);
		return user;
	}

}
